package com.kris.dev3.Model;

/**
 *  单例模式
 *  线程安全
 *  双重校验单例
 */
public class SingleWorld {

    private static SingleWorld singleWorld;

    private static SingleWorld getInstance(){
        if (singleWorld==null){
            synchronized(SingleWorld.class){
                singleWorld = new SingleWorld(); // 实例化一个对象
            }
        }
        return singleWorld;
    }




}

